<template>
  <div id="app">
    <keep-alive>
    
    <router-view></router-view>
    </keep-alive>

    <van-tabbar route v-if="this.$route.meta.isFootShow">
      <van-tabbar-item replace to="/" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item replace to="/topic" icon="orders-o">专题</van-tabbar-item>
      <van-tabbar-item replace to="/category" icon="shop-o">分类</van-tabbar-item>
      <van-tabbar-item replace to="/cart" icon="cart-o">购物车</van-tabbar-item>
      <van-tabbar-item replace to="/mine" icon="user-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  created() {
    var userInfo = {
      openId: "188957312",
      nickName: "Mr.房",
      avatarUrl:
        "https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIbWFEIJj8IpGeHM7dGic1aTFZALjWcMm9ltWfFiaQfVRYticWBfgGfzXWMt2EkJWiaicPtftHAlWxUibxQ/132",
    };
    var openId = userInfo.openId;
    localStorage.setItem("userInfo", JSON.stringify(userInfo));
    localStorage.setItem("openId", openId);
  },
};
</script>

<style lang="scss">
#app {
  height: calc(100% - 1px);
  border-top: 1px solid transparent;
}
</style>
